#ifndef MAIN_INTERFACE_H
#define MAIN_INTERFACE_H

#include <QMainWindow>

#include <QThread>
#include "tcp_client.h"

QT_BEGIN_NAMESPACE
namespace Ui {
class MainInterface;
}
QT_END_NAMESPACE

class DealTcpClientThreadOne : public QThread{
    Q_OBJECT

public:
    DealTcpClientThreadOne(){
        qDebug() << "DealTcpClientThreadOne() " << QThread::currentThread();

    }
};

class MainInterface : public QMainWindow
{
    Q_OBJECT

public:
    MainInterface(QWidget *parent = nullptr);
    ~MainInterface();

private:
    Ui::MainInterface *ui;

private:
    DealTcpClientThreadOne m_dealTcpClientThreadOne;
    //QThread m_dealTcpClientThreadOne;

    TcpClient* m_tcpClientOne;

    void initializeClient();

signals:
    void startClientConnectTcpServer();

    void sendData2TcpServer(QByteArray data);
};
#endif // MAIN_INTERFACE_H
